home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel
/
CAROUSEL.cdr
/
mactosh
/
code
/
p_serlib.sit
/
Serial Library Source Code
/
get_read_flags.c
< prev
next >
Wrap
Text File
|
1989-07-27
|
2KB
|
76 lines
/***********************************************************************/
/*
/* get_read_flags.c
/* by Atul Butte
/* Copyright ⌐ 1989 by Microsoft Corporation
/* All Rights Reserved
/*
/* version 1.0
/*
/*
/* This module provides a routine which will set the configuration
/* flags.
/*
/***********************************************************************/
/***********************************************************************/
/*
/* get_read_flags
/*
/***********************************************************************/
void get_read_flags( psz, pfEcho, pfEdit, pfStripLF, pfStrip8Bit, pfAddLF, pfIgnore )
register char *psz; /* string holding configStr */
Boolean *pfEcho; /* flag for echoing characters */
Boolean *pfEdit; /* flag for allowing edit characters */
Boolean *pfStripLF; /* flag for stripping line feeds */
Boolean *pfStrip8Bit; /* flag for stripping high bit */
Boolean *pfAddLF; /* flag for adding linefeeds */
Boolean *pfIgnore; /* flag for ignoring escape chars */
{
while( *psz != 0 ) {
switch( *psz ) {
case 'E':
*pfEcho = fTrue;
break;
case 'e':
*pfEcho = fFalse;
break;
case 'X':
*pfEdit = fTrue;
break;
case 'x':
*pfEdit = fFalse;
break;
case 'S':
*pfStripLF = fTrue;
break;
case 's':
*pfStripLF = fFalse;
break;
case 'L':
*pfAddLF = fTrue;
break;
case 'l':
*pfAddLF = fFalse;
break;
case 'A':
*pfStrip8Bit = fTrue;
break;
case 'a':
*pfStrip8Bit = fFalse;
break;
case 'I':
*pfIgnore = fTrue;
break;
case 'i':
*pfIgnore = fFalse;
break;
}
psz++;
}
}